package com.trackmybudget.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.trackmybudget.domain.Contact;
import com.trackmybudget.repo.ContactDao;

@Service
@Transactional
public class ContactServiceImpl implements ContactService {

  @Autowired
  private ContactDao contactDAO;
  
  @Override
  public void addContact(Contact contact) {
    contactDAO.addContact(contact);
  }

  @Override
  public List<Contact> listContact() {
    return contactDAO.listContact();
  }

  @Override
  public void removeContact(Integer id) {
    contactDAO.removeContact(id);
  }
}
